package com.lagou.order.feign;

import com.lagou.common.pojo.Goods;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@FeignClient(name = "lagou-service-goods",fallback = GoodsFeignFallBack.class)
public interface GoodsFeign {
    @GetMapping("/goods/query/{id}")
    public Goods queryById(@PathVariable Integer id);

    @RequestMapping(value="/update",method= RequestMethod.POST)
    @ResponseBody
    public int updateById(@RequestBody Goods goods);

    @GetMapping("delete/{id}")
    public int deleteById(@PathVariable Integer id);

    @GetMapping("queryAll")
    public List<Goods> queryAll();
}
